const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  publicPath: './',
  transpileDependencies: true,
  devServer: {
      port:3000,
      open:true,
      proxy:{
            '/api':{
              target:"http://localhost:8080", //跨域地址
              changeOrigin:true, //支持跨域
              rewrite:(path) => {
                console.log(path.replace(/^\/api/, ""))
                return path.replace(/^\/api/, "")
              }//重写路径,替换/api
            }
          }
    }
})
